def my_read(filename):
    file = open(filename, 'w+', encoding='utf-8')
    file.write('你好啊')
    # s = file.read()
    # s = file.read(2)
    # s = file.readline()  # 读取一行数据
    # s = file.readline(2)  # 从一行中读取2个字符
    # s = file.readlines()
    file.seek(3)  # 改变当前文件指针的位置 单位是字节
    s = file.read()
    print(type(s))
    print(s)
    file.close()

my_read('c.txt')